#Learn JavaScript Syntax
Explore tagged Tumblr posts
webtutorsblog · 2 years ago
Text
Start Your JavaScript Journey with WebTutor
In the world of web development, JavaScript has emerged as an essential programming language. Its versatility, ease of use, and ability to interact with HTML and CSS make it a powerful tool for creating dynamic and interactive websites. In this blog, we will explore the fundamental concepts of JavaScript, from its basic syntax and output to variables, operators, and more. Whether you're a beginner or a seasoned developer, there's something for everyone to learn and apply. Additionally, we'll introduce you to an excellent resource, webtutor.dev, where you can further enhance your JavaScript skills.
JavaScript Output
JavaScript allows developers to communicate with users by generating output in various ways. The most common method of output is using the console.log() function. It prints messages or data to the browser's console, which is useful for debugging and understanding what's happening in your code.
JavaScript Syntax
The syntax of JavaScript is quite user-friendly and similar to many other programming languages. Here are a few key points to remember:
Statements: JavaScript code is made up of statements, which can be declarations, assignments, function calls, loops, etc.
Case Sensitivity: JavaScript is case-sensitive, so variables myVar, myvar, and MYVAR are considered different.
Semicolons: While optional, it's a good practice to end statements with semicolons to avoid potential issues.
Whitespace: JavaScript ignores whitespace, so you can use spaces, tabs, and newlines for code formatting.
JavaScript Comments
JavaScript Comments are essential for code documentation and explanation. JavaScript supports both single-line and multi-line comments. Single-line comments start with //, and multi-line comments are enclosed between /* and */.
JavaScript Variables
Variables in JavaScript are used to store data values. They are declared using the let or const keyword. let allows reassignment, while const creates a constant that cannot be reassigned.
JavaScript Operators
Operators are symbols used to perform operations on variables and values. JavaScript supports various types of operators:
Arithmetic Operators: Used for basic arithmetic operations like addition, subtraction, multiplication, etc.
Comparison Operators: Used to compare values and return true or false based on the comparison.
Logical Operators: Used to combine multiple conditions and determine the overall truth value.
Assignment Operators: Used to assign values to variables.
Ternary Operator: A shorthand way of writing conditional statements.
Conclusion
JavaScript is the backbone of modern web development, enabling you to create dynamic and interactive websites that engage users effectively. By mastering JavaScript's syntax, output, comments, variables, and operators, you will have a strong foundation to build upon. Remember, continuous learning is the key to staying relevant and growing as a developer.
So, start your JavaScript journey today, and do not forget to visit webtutor.dev for an enriching learning experience that will take your skills to new heights. Happy coding!
0 notes
bestworstcase · 9 months ago
Note
Farran actually passed away 11 days ago and her posting duties will be taken over by a new Farran AI. Our coding team asked it what it thought of Salem and it used so much power typing the result that our entire city block had a blackout for a week, so we think it's basically ready now.
MGFTBDJEVCJCHVJFSBVK
please no machine could ever replicate my lovingly cultivated unhingedness and proclivity for biting people
really what happened (to elaborate on ‘swimming in javascript’) is i had a weeklong+ fistfight with the tumblr api. for…enrichment
15 notes · View notes
stupidpersonhere · 3 months ago
Text
I've been depressed the last couple of weeks so I decided to watch an Bee and Puppy Cat and please tell me why I saw Java snippet of subtracting and adding to the digits of Pi???
I kind find interesting they decided to write in Java, which is a multi platform language well known and stablished in the Industr and who is Jackson Nathan???
2 notes · View notes
codemerything · 2 years ago
Text
A structured way to learn JavaScript.
I came across a post on Twitter that I thought would be helpful to share with those who are struggling to find a structured way to learn Javascript on their own. Personally, I wish I had access to this information when I first started learning in January. However, I am grateful for my learning journey so far, as I have covered most topics, albeit in a less structured manner.
N/B: Not everyone learns in the same way; it's important to find what works for you. This is a guide, not a rulebook.
EASY
What is JavaScript and its role in web development?
Brief history and evolution of JavaScript.
Basic syntax and structure of JavaScript code.
Understanding variables, constants, and their declaration.
Data types: numbers, strings, boolean, and null/undefined.
Arithmetic, assignment, comparison, and logical operators.
Combining operators to create expressions.
Conditional statements (if, else if, else) for decision making.
Loops (for, while) for repetitive tasks. - Switch statements for multiple conditional cases.
MEDIUM
Defining functions, including parameters and return values.
Function scope, closures, and their practical applications.
Creating and manipulating arrays.
Working with objects, properties, and methods.
Iterating through arrays and objects.Understanding the Document Object Model (DOM).
Selecting and modifying HTML elements with JavaScript.Handling events (click, submit, etc.) with event listeners.
Using try-catch blocks to handle exceptions.
Common error types and debugging techniques.
HARD
Callback functions and their limitations.
Dealing with asynchronous operations, such as AJAX requests.
Promises for handling asynchronous operations.
Async/await for cleaner asynchronous code.
Arrow functions for concise function syntax.
Template literals for flexible string interpolation.
Destructuring for unpacking values from arrays and objects.
Spread/rest operators.
Design Patterns.
Writing unit tests with testing frameworks.
Code optimization techniques.
That's it I guess!
872 notes · View notes
izicodes · 2 years ago
Text
Tumblr media Tumblr media
I feel like some people are too serious with learning how to program. “I gotta be the best in this and that and build this and that to impress this employer” blah blah, that kills the fun out of programming. I see a lot of people (bashing people on Twitter again and actually a few people on here too, oops) making programming such a serious topic and you can’t have fun in it. Besides the proper syntax, documentation, best practises whatever, people in the tech community have putting up “rules” about how you should program and what to learn and if you fall out of that, you get ridiculed for it. Literally making it less fun.
Someone said that there’s no point in learning jQuery because JavaScript alone can do all that jQuery can and more.
So? I’m still going to learn it for fun? I’m having a blast with SCSS and jQuery, I don’t care 🤷🏾‍♀️ and I’ll learn the other frameworks and libraries that suits me because I want to. I don’t care if the entire tech community stops using a technology - if it interests me, I’m still going to learn it~!
Also no hate or anything to that person who said that to me - I completely understand your POV on jQuery! 💗✨ When I first read comment, I was a bit down like “oh what’s the point then…” but slapped myself and was like “I’m not learning for them or anyone. This library is cool and I like it so I’m still gonna use it”
Moral of the story: just do you. Do what makes you happy, code what you happy. Don’t be so serious all the time and make stupid dumb programs or games or websites whatever. Have fun in such a hard subject!!!
197 notes · View notes
frank-olivier · 2 months ago
Text
The story of BASIC’s development began in 1963, when Kemeny and Kurtz, both mathematics professors at Dartmouth, recognized the need for a programming language that could be used by non-technical students. At the time, most programming languages were complex and required a strong background in mathematics and computer science. Kemeny and Kurtz wanted to create a language that would allow students from all disciplines to use computers, regardless of their technical expertise.
The development of BASIC was a collaborative effort between Kemeny, Kurtz, and a team of students, including Mary Kenneth Keller, John McGeachie, and others. The team worked tirelessly to design a language that was easy to learn and use, with a syntax that was simple and intuitive. They drew inspiration from existing programming languages, such as ALGOL and FORTRAN, but also introduced many innovative features that would become hallmarks of the BASIC language.
One of the key innovations of BASIC was its use of simple, English-like commands. Unlike other programming languages, which required users to learn complex syntax and notation, BASIC used commands such as “PRINT” and “INPUT” that were easy to understand and remember. This made it possible for non-technical users to write programs and interact with the computer, without needing to have a deep understanding of computer science.
BASIC was first implemented on the Dartmouth Time-Sharing System, a pioneering computer system that allowed multiple users to interact with the computer simultaneously. The Time-Sharing System was a major innovation in itself, as it allowed users to share the computer’s resources and work on their own projects independently. With BASIC, users could write programs, run simulations, and analyze data, all from the comfort of their own terminals.
The impact of BASIC was immediate and profound. The language quickly gained popularity, not just at Dartmouth, but also at other universities and institutions around the world. It became the language of choice for many introductory programming courses, and its simplicity and ease of use made it an ideal language for beginners. As the personal computer revolution took hold in the 1970s and 1980s, BASIC became the language of choice for many hobbyists and enthusiasts, who used it to write games, utilities, and other applications.
Today, BASIC remains a popular language, with many variants and implementations available. While it may not be as widely used as it once was, its influence can still be seen in many modern programming languages, including Visual Basic, Python, and JavaScript. The development of BASIC was a major milestone in the history of computer science, as it democratized computing and made it accessible to a wider range of people.
The Birth of BASIC (Dartmouth College, August 2014)
youtube
Friday, April 25, 2025
7 notes · View notes
st-just · 1 year ago
Text
Slowly learning more javascript and like - I really wouldn't mind the arcane and ultra-precise grammar and syntax so much if it was at least consistent.
28 notes · View notes
hauntinginprogress · 3 months ago
Text
neocities heracles trials: from a chaotic newbie
okay so i want to actually start posting here and i finally got it through my thick skull that this is LITERALLY A BLOG. i'm supposed to blog. so here's a blog post.
anyways, for context, i've been working on my neocities for a while now, recently started over to make things more original and more me. another thing to note is that i'm using VScode.
the issue here is that i have zero well not exactly zero but i lack any professional/academic background experience with making websites. the html isn't the issue (thankfully) but holy shit dude...css+javascript implementation . basic styling with css is no biggie, right? absolutely, however...may i introduce: smooth transitions + the absolutely tragic fact that the <marquee> tag is deprecated an accessibility issue.
so, my first goal day one was to recreate a marquee animation through css. so i tried to simply implement this incredibly useful bit of code into my site (in which if you're interested i totally think my failure to get it working was user error so please check it out it works great if you're not me) but, lo and behold, despite me getting it to work in my V1 project, i could not, for the life of me, get it to work. so i, not too familiar with css animation and completely lost when it comes to javascript, started grasping at straws. i ended up finding this tutorial and, with some improvisation since the tutorial is for webflow and i'm manually writing everything, managed to make my own css recreation of a marquee effect essentially from scratch, and even learned about the animation-play-state css attribute so i could pause the effect when the marquee is hovered over! victory, basically.
Tumblr media
then, i looked around the many cool and absolutely awesome sites on neocities to get inspiration, and then i was like "hey what if i made a custom button background image" and with some trial and error, made myself a pretty decent base (for now) with aseprite, and learned more about the program in the meantime which is always a plus.
then i decided that i wanted to do more with the buttons. i wanted to make it animate on hover. not too hard right? you'll...you'll see why i struggled...in a moment...
anyways, i settled on a simple shrink animation. which THIS i could do with ease, messed around a bit, got the keyframes, assigned that to the button:hover and all of that and all was good!...until i realized that once i stopped hovering over it, it snapped back to its original scale instead of transitioning smoothly again. THIS is where the "fun" began.
see, although i can wrap my head around things easily when it comes to css, i have to constantly look up what the proper syntax for everything is because otherwise i'll mess everything up. and through my research i had conducted (aka surfing through multiple blogs and reddit posts alongside other things on random forum websites) i had discovered the very neat transition attribute.
but we'll have to return to this because i have adhd, and i ended up getting distracted during this process. see, originally i had decided that the button would change it's visual to appear like it was pressed when the user's mouse hovered over it. then i was like "i don't think this makes sense" so i changed it so that the button wouldn't change its background image unless the user actually clicked on it. so i did that. then i had to make sure that the button wouldn't magically scale up again so i had to transform the styling and blah blah blah those details aren't really that important ANYWAYS the actual important bit about this is that if you use the transition attribute and there's a change in background images that change will also be transitioned unless you set the transition to only apply to a specific change. and i didn't know that originally. so every time i tried to fix things up with a transition so the button wouldn't snap back to it's original size out of nowhere the background would slooowly change as well and i actually got so frustrated with this that i wanted to burn something down because that's a totally normal reaction i guess. anyways, then i started frantically searching for answers on the topic and EVERY. SINGLE. THING. THAT I FOUND. INCLUDED JAVASCRIPT.
i do not know javascript. i have not learned anything about it unlike css and html. it SCARES me and it is FRUSTRATING. but i thought i'd try it anyways. news flash that shit didn't work at all and i almost thought about scrapping the animation entirely especially when it randomly stopped working when i made certain changes, but i ended up eventually figuring out what i mentioned earlier (CSS transitions and the fact that you can assign them to only affect a specific change instead of everything) so with some dabbling here and there i eventually managed to finally figure out how to make everything smooth through pure css and although it still snaps if the element hasn't finished animating i'm happy with it.
Tumblr media
moving on to another thing, i wanted to then make a sound effect play when you click the button. yes, we are still talking about buttons. THIS i could not do with css, like, at all. javascript admittedly is for interactivity and i had already been bending the rules quite a bit with the animations since those teechnically should've been done with javascript as well but this? this was impossible without javascript. so i found a free mp3, and searched up a nice little tutorial on the very basics of javascript.
little did I know that apparently, this would be my own personal little hell.
see, no matter how many times i tried a different script, the sound just would not work like at all. i'd do everything in what i assumed to be the correct way, and no matter what, it would not play. knowing that i'd just have to revisit this, i decided it was best to just sort of put it on the back burner.
and this is where i wish i could say this is the end of my absolutely gobstopping rant. however, i cannot.
see, one thing that i really like that i've seen in a lot of other people's sites is draggable windows. i think they're sick. but this ALSO requires javascript, but i didn't think this could POSSIBLY be that bad since so many people did it.
...right?.......right? guys. right?
MOTHERFUCKER I WAS SO WRONG.
see, it turns out that a lot of people do this sort of thing with jQuery, specifically for user interfaces. but vscode doesn't have a "user friendly" way to get jquery to work with it. and because i don't want to mess with program files, i decided that logically speaking jquery just makes writing things in js scripts less complicated and doesn't introduce things that are impossible in vanilla javascript so i decided i could suffer a little bit and try and do things without jquery.
this led me to looking at many sites with draggable windows to look at their own scripts, in which every single time i tried replicating things i FAILED.
i eventually stumbled upon a nice code that worked. but the issue with it - in which unfortunately i can't find it, else i'd link it - is that it works with not only element classes but also a specific ID. see, this would be fine if i only wanted ONE draggable element. but i want multiple. and i thought that maybe if i just duplicated the script and dedicated it to a different ID and changed function names it would work but nooo life cannot be this easy apparently. so after setting up my webmaster status window, getting that to work, i tried doing the aforementioned method for what will eventually be a guestbook of sorts. it failed.
so i decided, "hey i'll revisit this later!!" and i went on to finding a way to implement a status widget into my site. this honestly was really easy as i ended up stumbling upon status.cafe . so i registered, eventually got my account activated, and i got it working in my live port of vscode just fine!! all is good in the world.
well that's what i thought until i found out that since i had created my neocities account in march of 2024, and i'm unemployed since i'm still in high school hence i have a free account, that i could not. use the widget. in neocities. so i tried finding a work around, found this handy guide (which is genuinely useful by the way) and set up things through a RSS feed instead which is essentially just a work around that complies with the security restrictions of neocities that i'm bound by. anyways, this works great but i literally just can't customize it to how i want so this is another fail. then i find imood.com which, although is NICE, doesn't suit what i want on its own. so i'm at a loss here too.
so, again, another thing to put to the side i suppose.
Tumblr media
so i started working on getting my guestbook, browsed through people's homepages again, and found chattable . and you probably think i have another paragraph complaining about this but honestly i can't write about something when i can't figure out how to even create a chat to implement onto my site in the first place so...y'know.
plus, i honestly have no clue if it'll work on my site either due to security restrictions so this is fun!!
anyways, after dealing with all of this, i finally decided it was about time i ported what i had so far over onto my neocities account. which isn't actually that hard i just had to wipe all of my files, overwrite the content in my index.html file there and paste in what i have now, and then upload my new files. but for some god awful reason after i went through all of this chrome just. kept depending on my old stylesheet??? so i had to clear some of my browsing data and eventually everything was loading properly for me.
and THIS is finally the end of my ridiculous documentation concering my neocities adventure so far.
i have no doubts i'll end up ranting here AGAIN about all of this but for now this is all i have on my plate...besides finally caving and learning javascript for real and continuing to learn more about html and css. hopefully one day i'll stop having such frequent issues but now is not the time and i doubt that'll be anytime soon either.
moral of the story, if you want to start something new and pick up a new hobby, please for the love of all that is of substance in this world don't go in completely blind like i've done if you're going to be making a project of some sorts. it will only lead to many misfortunes.
anyways you can see what i currently have done in my neocities here, make suggestions or give advice in the notes and whatnot i don't know.
6 notes · View notes
fullstackonion · 10 days ago
Text
Still Looks A Lot Like Love
Evening Musings June 12, 2025 · 5:57 PM
It’s almost 6 in the evening and I meant to post this sometime around midday—but as it always goes, things came up. Good things, though. And before this day ends, I just wanted to put this one out there. Maybe one more will follow before I go to bed tonight.
Today was a good day. A day well spent. Thank God for legal holidays and long weekends. Truly, sometimes we forget how vital it is to enjoy the little things in life—the ones that bring peace without asking for anything in return.
It’s nice to sit in front of a computer and not have to write in code. Not PHP, not JavaScript, not HTML, not even Python. To not worry whether the syntax will work, whether the logic is sound, or if something’s breaking where it shouldn’t. It’s just nice... not to think about work.
Just to type—whatever the brain needs to let go of.
Funny how, even though I haven’t done this in years, it’s like I never left. Fandom has always kept me afloat. But this—this is the one where I had to learn to come back to myself. To write just because the words sound good together. Because a photo or a drawing makes something stir in the chest and the only way to soothe it is to shape it into story.
It’s freeing. To not think: How do I fix this program? To not wonder: Why isn’t this running? To not hear the nagging: It’s not working the way it should.
No. Today, I got a breather.
Usually, that breather is on my Instagram—through photographs and short captions, little visual stories that people can read however they like. But this is something else entirely. And I’m thankful for it too.
Anyway—I'm rambling.
I created this post because I felt like the morning arc needed a companion. And knowing me, this one will have a companion too. Sometimes I really hate how my brain works in pieces. It never settles. It never says, “That’s enough.” It always asks, “And then what?”
Still, here we are.
I found something really cute. And since this little corner of the internet is my diary now, I’m posting it here. To those of you reading—thank you. If you find anything here worth taking, please take it. I don’t mind at all.
So anyway— Here it goes. :) Also—just a note: the images I’ve posted along with this entry are how I imagine Aldo would look in the moment. Thoughtful. Quiet. On the brink of something soft and world-changing. They helped the story form in my head. Somewhere Quieter
The door clicked shut behind him.
Aldo stood in the soft dark of his apartment, the hush of evening still clinging to his coat. He didn’t move for a long moment. Just breathed—slow, careful—as though any sudden motion might undo the fragile echo of what had just happened.
He touched his lips. Twice.
The elevator had already descended. Goffredo was gone. But the feeling lingered, like warmth left in a chair just vacated, or the scent of coffee long after the cup had been emptied.
He took off his coat and laid it gently over the back of the chair. Sat. Let the silence swell around him.
And then—almost involuntarily—he began to wonder.
How had it begun?
Not the kiss. Not even the dinner. No, it began somewhere earlier, quieter. Less pronounced. The sort of moment you don’t notice until it’s already changed something.
Aldo remembered the café.
Just a few days after the conclave. Rome still bristled with whispers and fresh judgments. The marble corridors hadn’t yet settled. Everyone was watching everyone—still guessing who had hoped for what.
He’d gone to a small café tucked beside a bookseller, a place with almond pastries and poor lighting and exactly the kind of solitude he needed. He was reading something—not for work, for once. A biography. He’d made it halfway through his espresso when the seat across from him scraped back.
Goffredo.
Wearing an ivory suit, of all things. Baby-blue shirt, slightly wrinkled at the sleeves. No cassock. Just a man. A man carrying a small box of persicata—the kind of peach-sugar sweet no one ever admits to liking but everyone secretly does.
“I remembered you liked these,” Goffredo said, setting the box down between them.
“I didn’t know I’d said that.”
“You didn’t.”
A pause.
“You always take the ones from the snack table,” Goffredo added. “Even when they’re too sweet.”
Aldo had blinked at him, unsure whether to be annoyed or oddly touched.
Goffredo ordered a macchiato. Stayed.
No speeches. No posturing. No apologies, either—just... presence. Uncloaked. Quiet.
“After all that,” Aldo had said at last, gesturing vaguely, “I thought we might go back to pretending the other didn’t exist.”
Goffredo had tilted his head. “We could. But I think I’ve grown tired of pretending.”
They hadn’t become friends overnight. They didn’t become anything, really. But after that afternoon, they kept running into each other. At meetings. In the corridors. On accident, then on purpose.
Small things changed. Goffredo stopped cutting into Aldo’s points during debates. Aldo started leaving memos with room for replies. One afternoon, he caught Goffredo holding the door for him a little too long. Another time, Goffredo found an annotated article left on his desk—with Aldo’s handwriting in the margins.
Eventually, they shared coffee. Then lunches. Sometimes walks.
The friendship, when it came, arrived quietly.
Aldo remembered one late afternoon in the library—just the two of them and the distant tapping of a rainstorm against the stained-glass windows. Goffredo had asked, not unkindly, “When did you stop hating me?”
Aldo had shrugged. “I don’t know. When did you stop being insufferable?”
They’d both smiled. It had been easy, for once.
And then, one morning, over breakfast in the refectory, Aldo told Thomas, Raymond, and Giulio—offhandedly, almost as an afterthought—that he’d been “spending time” with Goffredo.
Thomas raised an eyebrow. “Spending time as in... diplomacy?”
Raymond had grinned behind his coffee. Giulio only hummed knowingly and stabbed a boiled egg.
“It’s not like that,” Aldo insisted.
“It’s never like that,” Giulio replied. “Until it is.”
Aldo had laughed them off. But he remembered how warm his face felt.
And now, tonight—after the kiss—he wondered if they had all known before he did.
The warmth had never left.
Aldo leaned back in his chair now, in his quiet apartment, letting the memories fade into stillness again. On the table in front of him sat a small, unopened box of persicata. He didn’t know when Goffredo had left it there.
He smiled.
And for the first time in years, Aldo felt like he was at the beginning of something—not grand, not inevitable, but real.
Something he could choose.
And maybe, just maybe, something that had already chosen him.
Tumblr media Tumblr media
6 notes · View notes
watchmorecinema · 2 years ago
Text
Normally I just post about movies but I'm a software engineer by trade so I've got opinions on programming too.
Apparently it's a month of code or something because my dash is filled with people trying to learn Python. And that's great, because Python is a good language with a lot of support and job opportunities. I've just got some scattered thoughts that I thought I'd write down.
Python abstracts a number of useful concepts. It makes it easier to use, but it also means that if you don't understand the concepts then things might go wrong in ways you didn't expect. Memory management and pointer logic is so damn annoying, but you need to understand them. I learned these concepts by learning C++, hopefully there's an easier way these days.
Data structures and algorithms are the bread and butter of any real work (and they're pretty much all that come up in interviews) and they're language agnostic. If you don't know how to traverse a linked list, how to use recursion, what a hash map is for, etc. then you don't really know how to program. You'll pretty much never need to implement any of them from scratch, but you should know when to use them; think of them like building blocks in a Lego set.
Learning a new language is a hell of a lot easier after your first one. Going from Python to Java is mostly just syntax differences. Even "harder" languages like C++ mostly just mean more boilerplate while doing the same things. Learning a new spoken language in is hard, but learning a new programming language is generally closer to learning some new slang or a new accent. Lists in Python are called Vectors in C++, just like how french fries are called chips in London. If you know all the underlying concepts that are common to most programming languages then it's not a huge jump to a new one, at least if you're only doing all the most common stuff. (You will get tripped up by some of the minor differences though. Popping an item off of a stack in Python returns the element, but in Java it returns nothing. You have to read it with Top first. Definitely had a program fail due to that issue).
The above is not true for new paradigms. Python, C++ and Java are all iterative languages. You move to something functional like Haskell and you need a completely different way of thinking. Javascript (not in any way related to Java) has callbacks and I still don't quite have a good handle on them. Hardware languages like VHDL are all synchronous; every line of code in a program runs at the same time! That's a new way of thinking.
Python is stereotyped as a scripting language good only for glue programming or prototypes. It's excellent at those, but I've worked at a number of (successful) startups that all were Python on the backend. Python is robust enough and fast enough to be used for basically anything at this point, except maybe for embedded programming. If you do need the fastest speed possible then you can still drop in some raw C++ for the places you need it (one place I worked at had one very important piece of code in C++ because even milliseconds mattered there, but everything else was Python). The speed differences between Python and C++ are so much smaller these days that you only need them at the scale of the really big companies. It makes sense for Google to use C++ (and they use their own version of it to boot), but any company with less than 100 engineers is probably better off with Python in almost all cases. Honestly thought the best programming language is the one you like, and the one that you're good at.
Design patterns mostly don't matter. They really were only created to make up for language failures of C++; in the original design patterns book 17 of the 23 patterns were just core features of other contemporary languages like LISP. C++ was just really popular while also being kinda bad, so they were necessary. I don't think I've ever once thought about consciously using a design pattern since even before I graduated. Object oriented design is mostly in the same place. You'll use classes because it's a useful way to structure things but multiple inheritance and polymorphism and all the other terms you've learned really don't come into play too often and when they do you use the simplest possible form of them. Code should be simple and easy to understand so make it as simple as possible. As far as inheritance the most I'm willing to do is to have a class with abstract functions (i.e. classes where some functions are empty but are expected to be filled out by the child class) but even then there are usually good alternatives to this.
Related to the above: simple is best. Simple is elegant. If you solve a problem with 4000 lines of code using a bunch of esoteric data structures and language quirks, but someone else did it in 10 then I'll pick the 10. On the other hand a one liner function that requires a lot of unpacking, like a Python function with a bunch of nested lambdas, might be easier to read if you split it up a bit more. Time to read and understand the code is the most important metric, more important than runtime or memory use. You can optimize for the other two later if you have to, but simple has to prevail for the first pass otherwise it's going to be hard for other people to understand. In fact, it'll be hard for you to understand too when you come back to it 3 months later without any context.
Note that I've cut a few things for simplicity. For example: VHDL doesn't quite require every line to run at the same time, but it's still a major paradigm of the language that isn't present in most other languages.
Ok that was a lot to read. I guess I have more to say about programming than I thought. But the core ideas are: Python is pretty good, other languages don't need to be scary, learn your data structures and algorithms and above all keep your code simple and clean.
20 notes · View notes
sevenguo77 · 6 months ago
Text
JavaScript Tutorial: A Beginner's Guide to the World of Web Development
Welcome to the exciting world of JavaScript! If you're looking to dive into web development, understanding JavaScript is essential. This versatile programming language powers the interactive elements of websites and is a key component of modern web applications. In this tutorial, we'll cover the basics of JavaScript, its syntax, and some practical examples to get you started.
What is JavaScript?
JavaScript is a high-level, dynamic, and interpreted programming language that is primarily used for enhancing the interactivity of web pages. It allows developers to create rich user experiences by manipulating HTML and CSS, responding to user events, and communicating with servers.
Why Learn JavaScript?
Ubiquity: JavaScript is supported by all modern web browsers, making it a universal language for web development.
Versatility: Beyond the browser, JavaScript can be used on the server-side (with Node.js), in mobile app development (with frameworks like React Native), and even in game development.
Community and Resources: With a vast community and numerous resources available, learning JavaScript is more accessible than ever.
Getting Started with JavaScript
Setting Up Your Environment
To start coding in JavaScript, you don't need any special software. All you need is a web browser and a text editor. Here’s how to set it up:
Choose a Text Editor: Popular options include Visual Studio Code, Sublime Text, and Atom.
Open Your Browser: You can use any modern browser like Chrome, Firefox, or Edge.
2 notes · View notes
Text
Javascript Interview Question #2
Tumblr media
Learn Arrow Functions in JavaScript in 60 Seconds! 🚀
youtube
Learn how to write concise, powerful code with arrow functions. We’ll cover the syntax, key features, and how they make your code cleaner and more efficient. Perfect for simplifying callbacks and working with arrays. Watch now to take your JavaScript skills to the next level!
Learn and Simplify with Sensation Solutions
📥 Subscribe to our YouTube channel for daily JavaScript Shorts that simplify complex topics for beginners and professionals alike.
📺 Explore our complete playlist on JavaScript Interview Questions to gain mastery over essential coding concepts and confidently tackle your next interview.
👉 Ready to crack your JavaScript interview? Start learning and practice with industry-relevant examples now!
Watch & Subscribe the playlist :https://www.youtube.com/playlist?list=PL6a5cVtbW_6dJNHg70YEXz0AqdDEkADmB
3 notes · View notes
guzsdaily · 8 months ago
Text
Good Code is Boring
Daily Blogs 358 - Oct 28th, 12.024
Something I started to notice and think about, is how much most good code is kinda boring.
Clever Code
Go (or "Golang" for SEO friendliness) is my third or fourth programming language that I learned, and it is somewhat a new paradigm for me.
My first language was Java, famous for its Object-Oriented Programming (OOP) paradigms and features. I learned it for game development, which is somewhat okay with Java, and to be honest, I hardly remember how it was. However, I learned from others how much OOP can get out of control and be a nightmare with inheritance inside inheritance inside inheritance.
And then I learned JavaScript after some years... fucking god. But being honest, in the start JS was a blast, and I still think it is a good language... for the browser. If you start to go outside from the standard vanilla JavaScript, things start to be clever. In an engineering view, the ecosystem is really powerful, things such as JSX and all the frameworks that use it, the compilers for Vue and Svelte, and the whole bundling, and splitting, and transpiling of Rollup, ESBuild, Vite and using TypeScript, to compile a language to another, that will have a build process, all of this, for an interpreted language... it is a marvel of engineering, but it is just too much.
Finally, I learned Rust... which I kinda like it. I didn't really make a big project with it, just a small CLI for manipulating markdown, which was nice and when I found a good solution for converting Markdown AST to NPF it was a big hit of dopamine because it was really elegant. However, nowadays, I do feel like it is having the same problems of JavaScript. Macros are a good feature, but end up being the go-to solution when you simply can't make the code "look pretty"; or having to use a library to anything a little more complex; or having to deal with lifetimes. And if you want to do anything a little more complex "the Rust way", you will easily do head to head with a wall of skill-issues. I still love it and its complexity, and for things like compiler and transpilers it feels like a good shot.
Going Go
This year I started to learn Go (or "Golang" for SEO friendliness), and it has being kinda awesome.
Go is kinda like Python in its learning curve, and it is somewhat like C but without all the needing of handling memory and needing to create complex data structured from scratch. And I have never really loved it, but never really hated it, since it is mostly just boring and simple.
There are no macros or magic syntax. No pattern matching on types, since you can just use a switch statement. You don't have to worry a lot about packages, since the standard library will cover you up to 80% of features. If you need a package, you don't need to worry about a centralized registry to upload and the security vulnerability of a single failure point, all packages are just Git repositories that you import and that's it. And no file management, since it just uses the file system for packages and imports.
And it feels like Go pretty much made all the obvious decisions that make sense, and you mostly never question or care about them, because they don't annoy you. The syntax doesn't get into your way. And in the end you just end up comparing to other languages' features, saying to yourself "man... we could save some lines here" knowing damn well it's not worth it. It's boring.
You write code, make your feature be completed in some hours, and compile it with go build. And run the binary, and it's fast.
Going Simple
And writing Go kinda opened a new passion in programming for me.
Coming from JavaScript and Rust really made me be costumed with complexity, and going now to Go really is making me value simplicity and having the less moving parts are possible.
I am becoming more aware from installing dependencies, checking to see their dependencies, to be sure that I'm not putting 100 projects under my own. And when I need something more complex but specific, just copy-and-paste it and put the proper license and notice of it, no need to install a whole project. All other necessities I just write my own version, since most of the time it can be simpler, a learning opportunity, and a better solution for your specific problem. With Go I just need go build to build my project, and when I need JavaScript, I just fucking write it and that's it, no TypeScript (JSDoc covers 99% of the use cases for TS), just write JS for the browser, check if what you're using is supported by modern browsers, and serve them as-is.
Doing this is really opening some opportunities to learn how to implement solutions, instead of just using libraries or cumbersome language features to implement it, since I mostly read from source-code of said libraries and implement the concept myself. Not only this, but this is really making me appreciate more standards and tooling, both from languages and from ecosystem (such as web standards), since I can just follow them and have things work easily with the outside world.
The evolution
And I kinda already feel like this is making me a better developer overhaul. I knew that with an interesting experiment I made.
One of my first actual projects was, of course, a to-do app. I wrote it in Vue using Nuxt, and it was great not-gonna-lie, Nuxt and Vue are awesome frameworks and still one of my favorites, but damn well it was overkill for a to-do app. Looking back... more than 30k lines of code for this app is just too much.
And that's what I thought around the start of this year, which is why I made an experiment, creating a to-do app in just one HTML file, using AlpineJS and PicoCSS.
The file ended up having just 350 files.
Today's artists & creative things Music: Torna a casa - by Måneskin
© 2024 Gustavo "Guz" L. de Mello. Licensed under CC BY-SA 4.0
4 notes · View notes
not-toivo · 8 months ago
Text
So, a month ago I finally got a job as a frontend dev, so, hooray,🥳, I now get to enjoy ✨Vue✨ and ✨Nuxt✨ 5 days a week and get paid for that. But since I've been unemployed for a very long time, this sudden change means that I'm even more tired to learn new things in my spare time, and also that there isn't much spare time now. I haven't posted much here before and so it seems I'm unlikely to be more active here in the future. Sad.
I did, though, try to read the 1st book on the list from the website Teach Yourself Computer Science, the one called Structure and Interpretation of Computer Programs (the reason for me to do that is because I don't have any STEM background, and, I guess, if I want to continue a career in a sphere rapidly encroached by AI, it's good to have some fundamental knowledge). I read about a ⅕ of the book, finally understood what it means for Haskell to be called a "lazy" language, but the exercises at the end of the chapters are too hard and math-heavy for me. Also, sad.
The book uses a programming language from the LISP family, called Scheme. I thought I could get by by installing Clojure instead, but that journey ended with the VS Code extension for Clojure, called Calva slowing down and then completely corrupting (?) WSL connection, so that I had then to reinstall my WSL "instance". (Yes, I use Windows, because I'm not a programmer). Which is sad, because the extension looked good and feature-heavy, it just couldn't function well in WSL environment for some reason…
After that, I installed Racket (another LISP) on the freshly reinstalled WSL distro, but then I couldn't pick up the book again and continue learning for, like, a week and a half, which is where I am at now. (Racket allows to define arbitrary syntax/semantics for the compiler, which in turn allows developers to create new domain specific languages distributed simply as Racket packages, with one of those packages being the dialect of Scheme used by SICP, the book mentioned earlier).
There is also the PureScript book, Functional Programming Made Easier by Charles Scalfani, which I'm unlikely to finish ever. The language is neat (it's very similar to Haskell, but compiles to JavaScript), but a bit overcomplicated for a simple goal of making interfaces. I do think, however, that I might try learning Elm at some point: the amount of time I've spent at work, trying to understand, why and at what point the state of some component mutated in a Nuxt app is, honestly, impressive, and I want to try something built around the idea of immutability.
2 notes · View notes
izicodes · 2 years ago
Note
Any tips on learning python? I already know Java, C++, and JavaScript.
Hiya! 💗
Since you already know those other languages, Python will be literally a piece of cake. It'll be easy for you, in my opinion.
Tips? I would say:
Start with the Basics: Begin by understanding the fundamental syntax and concepts of Python. After learning those, you can basically apply the languages you know logic into Python code and you'll be done. You can use online tutorials on YouTube or free online pdf books to get a good grasp of the basics.
Leverage Your Programming Experience:Like I mentioned Python shares similarities with many languages, so relate Python concepts to what you already know. For example, understand Python data types and structures in comparison to those in Java, C++, or JavaScript.
Projects and Practice:I sing this on my blog but practice is crucial. Start small projects or challenges to apply your Python knowledge. Depends what you want to build e.g. console apps, games, websites etc. Just build something small every so often!
Hope this helps! More tips I made: ask 1 | project ideas | random resources
Tumblr media
⤷ ♡ my shop ○ my mini website ○ pinned ○ navigation ♡
29 notes · View notes
techaircraft · 8 months ago
Text
Tumblr media
Unlock the power of web development with TechAircraft’s 'Learn JavaScript' course! 🚀 Whether you're a beginner or looking to enhance your skills, our comprehensive program covers everything from basic syntax to advanced concepts. Master the art of creating interactive web pages and dynamic applications that captivate users. With hands-on projects and real-world examples, you’ll gain practical experience that sets you apart in the tech industry.
Join a community of aspiring developers and elevate your coding journey. The future of web development is at your fingertips—don’t miss out!
LearnJavaScript #TechAircraft #WebDevelopment #CodingJourney #TechSkills #JavaScript #Programming #TechEducation
2 notes · View notes